function single2(T,Npath,Ndt)
%function mctest(T,Npath,Ndt)
tic
myfun=@(s) sin(s);
paths=zeros(Npath,51);
dt=T/Ndt;
for ii=2:51
    curtime=0.01*(ii-2)+(1:100)*dt;
    cursigma=myfun(curtime);
    paths(:,ii)=paths(:,ii-1)+(randn(Npath,100)*cursigma')*sqrt(dt);    
end
time=0.1; r=0.1; K=1; 
index=floor(time/0.01+0.0005+1);
X=paths(:,index);
%X=abs(X);
mcprice(1)=sum(X)/Npath


